Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.hw.verilog
Class OutputFile

    java.lang.Object
      rdlc.main.OutputFile
          rdlc.hw.verilog.OutputFile

     class OutputFile

extends OutputFile

Contains a number of very simply print functions designed to aid in generating verilog output files which have comments and are actually readable.

Version:
  $Revision: 1.2
Author:
  Greg Gibeling

Field Summary
`protected static int` | `declTab` The number of tabs to use before each line of the port declarations.
`protected static java.lang.String` | `declTabString` A string of tabs to put before each line in the port declarations.
`protected static int` | `instConnTab` The number of tabs to use before each each dotted port connection in an instance.
`protected static java.lang.String` | `instConnTabString` A string of tabs to use before each each dotted port connection in an instance.
`protected static int` | `instPortTab` The number of tabs to use before each dotted port declaration in an instance.
`protected static java.lang.String` | `instPortTabString` A string of tabs to use before each dotted port declaration in an instance.
`static java.lang.String[]` | `OP_INFIX` The infix operators for those expression operators which are infix.
`protected static int` | `portListTab` The number of tabs to use before each line in the port list.
`protected static java.lang.String` | `portListTabString` A string of tabs to put before each port in the port list.

Fields inherited from class rdlc.main.OutputFile
`author, description, fileName, out`

Constructor Summary
`OutputFile(java.io.File outputPath, java.lang.String _fileName, java.lang.String _author, java.lang.String _description, java.util.List<java.io.File> manifest, Log errorLog)`

Method Summary
`protected java.lang.String` | `concatenateString(Expression_Operation expression, boolean skipFirst)` Convert the given expression to a concatenation string.
`protected static java.util.List<java.io.File>` | `emit(java.io.File outputPackagePath, Declaration _declaration, java.lang.String _author, java.lang.String _description, boolean shell, boolean outputAll, Log errorLog)` Emit the given declaration and all of the declarations that it requires to the given path.
`protected static java.util.List<java.io.File>` | `emit(java.io.File outputPackagePath, Declaration _declaration, java.lang.String _author, java.lang.String _description, boolean shell, CatalogSet<Declaration> outputSet, boolean recurse, boolean first, Log errorLog)` Emit the given declaration.
`protected void` | `printComment(int indent, java.lang.String comment)` Print a comment at the given tabstop.
`protected void` | `printCopyright()` Print the copyright header.
`protected void` | `printDivider()` Print an standard divider.
`protected void` | `printDivider(int indent)` Print an standard divider, starting from the given tabstop.
`protected void` | `printDivider(int indent, char dash)` Print an arbitrary divider, starting from the given tabstop and using the given dash character.
`protected void` | `printHeader()` Print a header for the file, including CVS changelog and tags.
`protected void` | `printInclude()` Print the include statements for const.v.
`protected void` | `printInstance(ModuleInstance_Indirect instance)` Print the given module instance as an actual verilog module instantiation.
`protected void` | `printLabel(int indent, java.lang.String label)` Print a section label in a comment at the given tabstop.
`protected void` | `printLabeledComment(int indent, java.lang.String label, java.lang.String comment)` Print a labeled comment at the given tabstop.
`protected void` | `printLibraryFile(LibraryFile file)` Output a library file by simple copying the contents of its associated file to the proper output location.
`protected void` | `printLibraryInclude(FileInclude include)` Output a library include by simple copying the contents of its associated file to the proper output location.
`protected void` | `printLibraryModule(LibraryModule module)` Output a library module by simple copying the contents of its associated file to the proper output location.
`protected void` | `printLicense()` Print the license terms, This is in it's own method so that it can be easily changed.
`protected void` | `printLogic(ModuleLogic logic)` Print the given ModuleLogic as an assign statement.
`protected void` | `printLogicEnd()` Print the comments that mark the end of the assign statements.
`protected void` | `printLogicStart()` Print the comments that mark the start of the assign statements.
`protected void` | `printModuleDeclEnd()` Print a module declaration end.
`protected void` | `printModuleDeclStart(Module module)` Print a module declaration start.
`protected void` | `printModuleEnd()` Print an `endmodule` along with the closing divider.
`protected void` | `printMux(ModuleMux mux)` Print the given ModuleMux as an always block with a casex inside of it.
`protected void` | `printParamGroup(ModuleParameterGroup paramGroup)` Print a `ModuleParameterGroup` declaration.
`protected void` | `printWire(ModuleWire wire)` Print a verilog declaration for the given wire.
`protected void` | `printWireGroupDecl(ModuleWireGroup wireGroup)` Print a `ModuleWireGroup` in it's verilog port declaration form.
`protected void` | `printWireGroupList(ModuleWireGroup wireGroup, boolean last)` Print a `ModuleWireGroup` in it's verilog port list form.
`protected java.lang.String` | `toString(Expression expression, boolean includeBitWidth)` Convert the given HDL expression to it's equivalent verilog string.
`protected java.lang.String` | `toString(ModuleWire.Type type)` Return the verilog string for the given wire type.

Methods inherited from class rdlc.main.OutputFile
`delete, escapeQuotes, getCloseSpace, padToTab, printBlankLine, printTableRow, stringWidth`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### portListTab

    protected static final int portListTab

  The number of tabs to use before each line in the port list.

  See Also:
    Constant Field Values

### portListTabString

    protected static final java.lang.String portListTabString

  A string of tabs to put before each port in the port list.

  See Also:
    Constant Field Values

### declTab

    protected static final int declTab

  The number of tabs to use before each line of the port declarations.

  See Also:
    Constant Field Values

### declTabString

    protected static final java.lang.String declTabString

  A string of tabs to put before each line in the port declarations.

  See Also:
    Constant Field Values

### instPortTab

    protected static final int instPortTab

  The number of tabs to use before each dotted port declaration in an instance.

  See Also:
    Constant Field Values

### instPortTabString

    protected static final java.lang.String instPortTabString

  A string of tabs to use before each dotted port declaration in an instance.

  See Also:
    Constant Field Values

### instConnTab

    protected static final int instConnTab

  The number of tabs to use before each each dotted port connection in an instance.

  See Also:
    Constant Field Values

### instConnTabString

    protected static final java.lang.String instConnTabString

  A string of tabs to use before each each dotted port connection in an instance.

  See Also:
    Constant Field Values

### OP_INFIX

    public static final java.lang.String[] OP_INFIX

  The infix operators for those expression operators which are infix.

Constructor Detail

### OutputFile

    public OutputFile(java.io.File outputPath,
                      java.lang.String _fileName,
                      java.lang.String _author,
                      java.lang.String _description,
                      java.util.List<java.io.File> manifest,
                      Log errorLog)

See Also:
  `OutputFile.OutputFile(File, String, String, String, List, Log)`

Method Detail

### printDivider

    protected void printDivider(int indent,
                                char dash)

  Print an arbitrary divider, starting from the given tabstop and using the given dash character.

  Parameters:
    `indent` - The tabstop to start from.
    `dash` - The dash character to use.

### printDivider

    protected void printDivider(int indent)

  Print an standard divider, starting from the given tabstop.

  Parameters:
    `indent` - The tabstop to start from.
  See Also:
    `printDivider(int, char)`

### printDivider

    protected void printDivider()

  Print an standard divider.

  See Also:
    `printDivider(int, char)`, `printDivider(int)`

### printCopyright

    protected void printCopyright()

  Print the copyright header. This is in it's own method so that it can be easily be changed.

### printLicense

    protected void printLicense()

  Print the license terms, This is in it's own method so that it can be easily changed.

### printHeader

    protected void printHeader()

  Print a header for the file, including CVS changelog and tags. This will also include the copyright, license, author and description of the file.

### printInclude

    protected void printInclude()

  Print the include statements for const.v.

### printLabel

    protected void printLabel(int indent,
                              java.lang.String label)

  Print a section label in a comment at the given tabstop.

  Parameters:
    `indent` - The tabstop.
    `label` - The label string.

### printComment

    protected void printComment(int indent,
                                java.lang.String comment)

  Print a comment at the given tabstop.

  Parameters:
    `indent` - The tabstop.
    `comment` - The comment string.

### printLabeledComment

    protected void printLabeledComment(int indent,
                                       java.lang.String label,
                                       java.lang.String comment)

  Print a labeled comment at the given tabstop.

  Parameters:
    `indent` - The tabstop.
    `label` - The label string.
    `comment` - The comment string.

### printModuleDeclStart

    protected void printModuleDeclStart(Module module)

  Print a module declaration start. This incldues the header comments for the module and the `module` keyword itself.

  Parameters:
    `module` - The module we're declaring.

### printModuleDeclEnd

    protected void printModuleDeclEnd()

  Print a module declaration end. This should come right after any port listing for the module.

### printModuleEnd

    protected void printModuleEnd()

  Print an `endmodule` along with the closing divider.

### printWireGroupList

    protected void printWireGroupList(ModuleWireGroup wireGroup,
                                      boolean last)

  Print a `ModuleWireGroup` in it's verilog port list form. Should be called between `printModuleDeclStart()/`and `printModuleDeclEnd`.

  ``
  Parameters:
    `wireGroup` - The wire group to print.
    `last` - `true` if this is the last port group.
  See Also:
    `printModuleDeclStart(Module)`, `printModuleDeclEnd()`

### printWireGroupDecl

    protected void printWireGroupDecl(ModuleWireGroup wireGroup)

  Print a `ModuleWireGroup` in it's verilog port declaration form. Should be called after `printModuleDeclEnd`.

  Parameters:
    `wireGroup` - The wire group to print.

### toString

    protected java.lang.String toString(Expression expression,
                                        boolean includeBitWidth)

  Convert the given HDL expression to it's equivalent verilog string. This is used rather than direct printing because expressions are so prevalent.

  Parameters:
    `expression` - The expression to convert to a string.
    `includeBitWidth` - Should the bitwidths be included in the output? (false for parameters usually)
  Returns:
    A verilog string representing the given expression.

### concatenateString

    protected java.lang.String concatenateString(Expression_Operation expression,
                                                 boolean skipFirst)

  Convert the given expression to a concatenation string.

  Parameters:
    `expression` - The expression whose arguments should be concatenated.
    `skipFirst` - Should the first argument be skipped?
  Returns:
    A string representing the concatenation of all the arguments to this expression.

### printLogicStart

    protected void printLogicStart()

  Print the comments that mark the start of the assign statements.

### printLogic

    protected void printLogic(ModuleLogic logic)

  Print the given ModuleLogic as an assign statement.

  Parameters:
    `logic` - The logic to print as an assign statement.

### printLogicEnd

    protected void printLogicEnd()

  Print the comments that mark the end of the assign statements.

### printMux

    protected void printMux(ModuleMux mux)

  Print the given ModuleMux as an always block with a casex inside of it.

  Parameters:
    `mux` - The mux to print.

### printInstance

    protected void printInstance(ModuleInstance_Indirect instance)

  Print the given module instance as an actual verilog module instantiation.

  Parameters:
    `instance` - The module instance to print.

### printParamGroup

    protected void printParamGroup(ModuleParameterGroup paramGroup)

  Print a `ModuleParameterGroup` declaration.

  Parameters:
    `paramGroup` - The parameter group to print.

### printWire

    protected void printWire(ModuleWire wire)

  Print a verilog declaration for the given wire.

  Parameters:
    `wire` - The wire we want to print a declaration for.

### toString

    protected java.lang.String toString(ModuleWire.Type type)

  Return the verilog string for the given wire type.

  Parameters:
    `type` - The wire type we're trying to declare.
  Returns:
    The verilog string to use for the declaration.

### printLibraryModule

    protected void printLibraryModule(LibraryModule module)

  Output a library module by simple copying the contents of its associated file to the proper output location.

  Parameters:
    `module` - The library module to output.

### printLibraryFile

    protected void printLibraryFile(LibraryFile file)

  Output a library file by simple copying the contents of its associated file to the proper output location.

  Parameters:
    `file` - The library file to output.

### printLibraryInclude

    protected void printLibraryInclude(FileInclude include)

  Output a library include by simple copying the contents of its associated file to the proper output location.

  Parameters:
    `include` - The library include to output.

### emit

    protected static java.util.List<java.io.File> emit(java.io.File outputPackagePath,
                                                       Declaration _declaration,
                                                       java.lang.String _author,
                                                       java.lang.String _description,
                                                       boolean shell,
                                                       boolean outputAll,
                                                       Log errorLog)

  Emit the given declaration and all of the declarations that it requires to the given path. Take into account the author and description strings given.

  Parameters:
    `outputPackagePath` - The path to which the output should go.
    `_declaration` - The declaration to output, along with it's requirements.
    `_author` - The author or username of the person running RDLC.
    `_description` - A quick description of this project.
    `errorLog` - A list of errors to be reported to the user.

### emit

    protected static java.util.List<java.io.File> emit(java.io.File outputPackagePath,
                                                       Declaration _declaration,
                                                       java.lang.String _author,
                                                       java.lang.String _description,
                                                       boolean shell,
                                                       CatalogSet<Declaration> outputSet,
                                                       boolean recurse,
                                                       boolean first,
                                                       Log errorLog)

  Emit the given declaration.

  Parameters:
    `outputPackagePath` - The path to which the output should go.
    `_declaration` - The declaration to output, along with it's requirements.
    `_author` - The author or username of the person running RDLC.
    `_description` - A quick description of this project.
    `shell` - Is this a shell unit we're generating?
    `outputSet` - The set of declarations to output as we traverse the namespace hierarchy.
    `recurse` - Should recursive folders be created for each namespace? (as opposed to putting everything in one folder).
    `first` - Is this the first call to this method as it recurses on itself?
    `errorLog` - A list of errors to be reported to the user.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD